<html>
    <head>
        <title>产品列表</title>
        <link href="{$Think.const.ADMIN_CSS_URL}bootstrap.css" rel="stylesheet" />
        <link href="{$Think.const.ADMIN_CSS_URL}lz-style.css" rel="stylesheet" />
        <script src="{$Think.const.ADMIN_JS_URL}jquery.js"></script>
        <script src="{$Think.const.ADMIN_JS_URL}bootstrap.js"></script>
        <script src="{$Think.const.ADMIN_JS_URL}dataTables/jquery.dataTables.js"></script>
        <script src="{$Think.const.ADMIN_JS_URL}dataTables/dataTables.bootstrap.js"></script>
        <script src="{$Think.const.ADMIN_JS_URL}DatePicker/WdatePicker.js"></script>
        <script>
            $(document).ready(function () {
                $('#dataTables').dataTable({
                    paging: true,
                    searching: false,
                    showrownumber: true
                });
            });
        </script>
    </head>
    <body>
        <div class="container">
            <div class="row div_head" >
                <div class=" col-xs-6 col-sm-6 text-primary">
                    {$loction}
                </div>
                <div class=" col-xs-6 col-sm-3"></div>
                <div class=" col-xs-6 col-sm-3">
                    <a style="text-decoration: none;" href="__CONTROLLER__/add">【添加】</a>
                </div>
            </div>
            <hr />
            <div class="row div_form" >
                <form action="__SELF__" method="post">
<div class="text-right col-xs-6 col-sm-3 " ><label for="ProductCreateDate" class="control-label">{$Think.const.LB_PRODUCTCREATEDATE}:</label></div>
                    <div class="col-xs-6 col-sm-3" >
                        <input type="text" id="ProductCreateDate" name="ProductCreateDate" class="form-control Wdate" placeholder="{$Think.const.LB_PRODUCTCREATEDATE}" onClick="WdatePicker({el: this, isShowClear: false, readOnly: true, skin: 'whyGreen', dateFmt: 'yyyy/MM/dd'})"  />
                    </div>
<div class="text-right col-xs-6 col-sm-3 " ><label for="ProductCode" class="control-label">{$Think.const.LB_PRODUCTCODE}:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="ProductCode" name="ProductCode" class="form-control" placeholder="{$Think.const.LB_PRODUCTCODE}"  value="" maxlength="42"/>
                    </div>
<div class="text-right col-xs-6 col-sm-3 " ><label for="ProductName" class="control-label">{$Think.const.LB_PRODUCTNAME}:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="ProductName" name="ProductName" class="form-control" placeholder="{$Think.const.LB_PRODUCTNAME}"  value="" maxlength="100"/>
                    </div>
<div class="text-right col-xs-6 col-sm-3 " ><label for="ProductCategoryId" class="control-label">{$Think.const.LB_PRODUCTCATEGORYID}:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="ProductCategoryId" name="ProductCategoryId" class="form-control" placeholder="{$Think.const.LB_PRODUCTCATEGORYID}"  value="" maxlength="42"/>
                    </div>
<div class="text-right col-xs-6 col-sm-3 " ><label for="BrandID" class="control-label">{$Think.const.LB_BRANDID}:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="BrandID" name="BrandID" class="form-control" placeholder="{$Think.const.LB_BRANDID}"  value="" maxlength="42"/>
                    </div>
<div class="text-right col-xs-6 col-sm-3 " ><label for="ProductStatus" class="control-label">{$Think.const.LB_PRODUCTSTATUS}:</label></div>
                    <div class="col-xs-6 col-sm-3" >
        <select id="ProductStatus" name="ProductStatus" class="form-control" >
            <option value="" style="display: none"></option>
            <foreach name="GV_Enum.ProductStatus" item="row" key="k">
                <option value="{$k}">{$k}-{$row}</option>
            </foreach>
        </select>
                    </div>



                    <div class="col-xs-6 col-sm-3">
                        <input type="submit" id="search"  class="btn btn-default" value="查询">
                    </div>

                </form>
                <div id="error" class="row text-danger"></div>
                <div id="success" class="row text-success"></div>
            </div>
            <hr />
            <div class="row div_content" >
                <div class="col-md-12">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover table-condensed" id="dataTables" border="1">
                            <thead>
                                <tr>
                                    <th class="div_tab_head">序号</th>

                    <th class="div_tab_head">{$Think.const.LB_PRODUCTCODE}</th>

                    <th class="div_tab_head">{$Think.const.LB_PRODUCTNAME}</th>

                    <th class="div_tab_head">{$Think.const.LB_BASEPRICE}</th>

                    <th class="div_tab_head">{$Think.const.LB_PRODUCTCATEGORYID}</th>

                    <th class="div_tab_head">{$Think.const.LB_BRANDID}</th>

                    <th class="div_tab_head">{$Think.const.LB_PRODUCTIMG}</th>

                    <th class="div_tab_head">{$Think.const.LB_PRODUCTSIMG}</th>

                    <th class="div_tab_head">{$Think.const.LB_PRODUCTSTATUS}</th>

                                    <th class="div_tab_head">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <foreach name="lst" item="row" >
                                <tr>
                                    <td class="div_tab_cell">{$key+1}</td>
                    <td class="div_tab_cell div_tab_cell_text">{$row.productcode|stripcslashes}</td>
                    <td class="div_tab_cell div_tab_cell_text">{$row.productname|stripcslashes}</td>
                    <td class="div_tab_cell div_tab_cell_num">{$row.baseprice|stripcslashes}</td>
                    <td class="div_tab_cell div_tab_cell_text">{$row.productcategoryid|stripcslashes}</td>
                    <td class="div_tab_cell div_tab_cell_text">{$row.brandid|stripcslashes}</td>
                    <td class="div_tab_cell div_tab_cell_text">{$row.productimg|stripcslashes}</td>
                    <td class="div_tab_cell div_tab_cell_text">{$row.productsimg|stripcslashes}</td>
                    
<assign name="var_productstatus" value="$row.productstatus" />
<td class="div_tab_cell div_tab_cell_text">{$GV_Enum.ProductStatus.$var_productstatus|stripcslashes}</td>

                                    <td align="center" class="div_tab_cell"><div class="btn-group">
                                            <a id="edit" type="button" class="btn btn-default" href="__CONTROLLER__/edit/ProductCode/{$row.productcode}"><span class="glyphicon glyphicon-pencil"></span></a>
                                            <a id="delete" type="button" class="btn btn-default"href="__CONTROLLER__/del/ProductCode/{$row.productcode}" onClick="if (confirm('确定要删除吗？'))
                                                        return true;
                                                    else
                                                        return false;"><span class="glyphicon glyphicon-remove"></span></a>
                                        </div></td>
                                </tr>
                            </foreach>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </body>
</html>
